﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StringReverseUpgraded
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = "Kostya,Irina,Yan,Roman,Alex,Alexey,Elena,Timur";

            string[] arr = str.Split(',');
            Console.WriteLine(str);

            for(int i = 0; i < arr.Length/2; i++)
            {
                string temp = arr[i];
                arr[i] = arr[arr.Length - i - 1];
                arr[arr.Length - i - 1] = temp;
            }
            for(int i = 0; i < arr.Length; i++)
            {
                Console.Write(arr[i] + ",");
            }
            Console.ReadLine();
        }
    }
}
